from Base import Base
from selenium.webdriver.common.by import By

class Page1(Base):
    # 月考0617
    yk0617 = (By.XPATH, '/html/body/div/div/section/aside/ul/li[3]/div/span')
    def yk_click(self):
        self.click(self.yk0617)
    # 用户登录
    userlogin = (By.XPATH, '/html/body/div/div/section/aside/ul/li[3]/ul/li[1]/a')
    def ul_click(self):
        self.click(self.userlogin)
    # 用户名
    username= (By.XPATH, '/html/body/div/div/section/section/main/div[1]/div[2]/div[1]/div/input')
    def send_username(self,username):
        self.send_keys(self.username,username)
    # 密码
    password = (By.XPATH, '/html/body/div/div/section/section/main/div[1]/div[2]/div[2]/div/input')

    def send_password(self, password):
        self.send_keys(self.password, password)
    # 立即登录
    login_loc = (By.XPATH, '/html/body/div/div/section/section/main/div[1]/div[2]/button[2]')
    def login_click(self):
        self.click(self.login_loc)
    # 确认登录
    login2_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[2]/div/div/div/div[2]/button[2]/span')
    def login2_click(self):
        self.click(self.login2_loc)

    # 断言-用户登录
    dy_userlogin = (By.XPATH, '/html/body/div/div/section/section/main/div[1]/div[1]/span')
    # 断言-客户列表
    dy_custlist = (By.XPATH, '/html/body/div[1]/div/section/section/main/h1')